import request from './request'

// 历史记录相关接口
export class useSplitterApi {
    // 根据id获取切片分页
    async getSplitterPage(data: any) {
        console.log("调用切片分页查询接口");
        const response: any = await request({
            method: 'post',
            url: '/splitter/page',
            data
        })
        return response;
    }
    // 删除切片
    async deleteSplitter(id: String) {
        console.log("调用删除切片接口");
        const response: any = await request({
            method: 'delete',
            url: '/splitter',
            params: {
                id
            }
        });
        return response;
    }

    // 修改切片
    async updateSplitter(data: any) {
        console.log("调用修改切片接口");
        const response: any = await request({
            method: 'put',
            url: '/splitter/update',
            data
        });
        return response;
    }

    // 新增切片
    async addSplitter(data: any) {
        console.log("调用修改切片接口");
        const response: any = await request({
            method: 'post',
            url: '/splitter/add',
            data
        });
        return response;
    }
} 